package com.buer.storage.dao;


import com.buer.storage.dto.DepartmentDto;
import com.buer.storage.dto.DepartmentSelectDto;
import com.buer.storage.dto.WarehouseDto;
import com.buer.storage.entity.Area;
import com.buer.storage.entity.Department;
import com.buer.storage.entity.UserEntity;
import com.buer.storage.entity.Warehouse;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface WarehouseDao {
    //增加仓库
    int insert(WarehouseDto warehouseDto);
    //删除仓库
    int delete(int warehouseId);
    //修改仓库
    int update(Warehouse warehouse);
    //根据仓库id查询仓库信息
    Warehouse selectById(int warehouseId);
    //查询仓库所有信息
    List<Warehouse> findAll();
    //根据仓库id查询库区信息
    List<Area> findAllArea(int warehouseId);
    //根据仓库id查询库位信息
    List<DepartmentDto> findAllDepartment(int warehouseId);

    List<DepartmentSelectDto> findAreaByWarehouseId(Integer warehouseId);

    Department[] findDepartmentByWarehouseId(Integer areaId);

    List<Warehouse> getEntityList(Map<String, Object> map);
}
